﻿using System;
using System.Data.Entity;
using HQPad.Models;
using HQPad.DAL;
using System.Data.Entity.ModelConfiguration.Conventions;


namespace HQPad.DAL
{
    public class MembershipContext : DbContext, IUnitOfWork
    {
        public DbSet<Posting> Postings { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }

        public void Save()
        {
            SaveChanges();
        }

        public void Dispose()
        {
            base.Dispose();
        }
    }
}